export const tableOption = {
  border: true, //是否带有纵向边框
  selection: true, //行最前面的选择框
  menuAlign: "center",
  searchLabelWidth: 110, //搜索项标题宽度
  searchIndex: 4, //筛选收缩
  searchIcon: true,
  align: "center", //对齐方式
  emptyText: '自定义暂无数据提示语',
  column: [
    {
      label: "广告位编码",
      prop: "id",
      hide: true,
      editDisabled: true,
      editDisplay: false,
      addDisplay: false,
    },
    {
      label: "广告位名称",
      prop: "name",
      type: "input",
      search: true,
      span: 12
    },
    {
      label: "广告图片地址",
      prop: "pathImage",
      type: "upload",
      listType: 'picture-img',
      dataType: 'string',
      tip: '只能上传jpg/png文件,且不超过500kb',
      action: '/admin/sys-file/upload',
      propsHttp: {
        res: 'data'
      },
    },
    {
      label: "广告链接地址",
      prop: "pathUrl",
      type: "input",
      span: 12
    },
    {
      label: "状态",
      prop: "status",
      type: 'switch',
      dicData: [{
        label: '失效',
        value: 'N'
      }, {
        label: '生效',
        value: 'Y'
      }],
      slot: true,
      search: true,
      value: 'Y',
      span: 12
    },
    {
      label: "广告位置编码",
      prop: "advertisingType",
      type: "select",
      search: true,
      dicUrl: `/admin/mall/advertisingType/list`,
      props: {
        label: 'name',
        value: 'id'
      },
      formatter: (val, value, label) => {
        return `${label}(${value})`
      },
      rules: [
        {
          required: true,
          message: '请选择广告位置编码',
          trigger: 'blur'
        }
      ],
      span: 12
    },
    {
      label: "商场编码",
      prop: "storeNo",
      type: "select",
      search: true,
      dicUrl: `/admin/mall/store/list`,
      props: {
        label: 'storeName',
        value: 'storeNo'
      },
      formatter: (val, value, label) => {
        return `${label}(${value})`
      },
      rules: [
        {
          required: true,
          message: '请选择广告位置编码',
          trigger: 'blur'
        }
      ],
      span: 12
    },
    {
      label: "活动时间",
      prop: "activityTime",
      type: "datetime",
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [
        {
          required: true,
          message: '请选择活动时间',
          trigger: 'blur'
        }
      ],
      span: 12
    },
    {
      label: "录入人",
      prop: "createBy",
      type: "input",
      disabled: true,
      addDisplay: false,
      span: 12
    },
    {
      label: "录入日期",
      prop: "createTime",
      type: "datetime",
      disabled: true,
      addDisplay: false,
      format: 'yyyy-MM-dd HH:mm:ss',
      span: 12
    }
  ]
}
